﻿<%@ Page Language="C#"  AutoEventWireup="true" CodeBehind="AccessoryInInstrumentAdd.aspx.cs" Inherits="Runda.CMS.Portal.SyncManage.AccessoryInInstrumentAdd" %>
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
        <script src="../Content/global.js" type="text/javascript"></script>     
  <link href="../Content/global.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Menu/Menu.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Tab/tabs.css" rel="stylesheet" type="text/css" /> 
    <script type="text/javascript">
       
    </script>
</head>
<body>
    <form id="form1" runat="server">
          <rad:RadAjaxManager runat="server" ID="radajaxmanager1">
        <AjaxSettings>
            <rad:AjaxSetting AjaxControlID="BrandList">
                <UpdatedControls>
                    <rad:AjaxUpdatedControl ControlID="AccessoryList" LoadingPanelID="AjaxLoadingPanel"/>
                </UpdatedControls>
            </rad:AjaxSetting>          
        </AjaxSettings>
    </rad:RadAjaxManager>
       <rad:AjaxLoadingPanel runat="server" ID="AjaxLoadingPanel">
        <img src="../Images/Loading.gif" />数据载入......
    </rad:AjaxLoadingPanel>
    <table class="mnubar" cellspacing="0" cellpadding="0">
        <tbody>
            <tr>
                <td width="9">
                    <img hspace="3" src="../Content/Menu/mnu_vSpacer.gif" />
                </td>
                <td class="icMenu" nowrap>                 
                    <asp:LinkButton ID="lnkbtnSaveAndClose" runat="server"  
                         onclick="lnkbtnSaveAndClose_Click"><span class="menu" title="保存&amp;关闭" onclick="window.execScript(this.action);"><img class="mnuBtn" src="../Content/Menu/SaveClose_16_blue.gif"><span class="mnuBtn">保存&amp;关闭</span></span></asp:LinkButton>
                          
                    <img src="../Content/Menu/separator.gif">
                    <span class="menu" title="关闭" onclick="window.close();">
                        <img class="mnuBtn" src="../Content/Menu/Close_16_blue.gif"><span class="mnuBtn">关闭</span></span>
                </td>
            </tr>
        </tbody>
    </table>
    <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
    </div>
    <div id="areaForm" class="area">
        <table cellspacing="0" cellpadding="0" width="100%">
            <tbody>
                <tr>
                    <td valign="top">
                        <div style="display: inline" id="appForm_tab0" class="tab">
                           <asp:HiddenField runat="server" ID="hiddenInstrumentID" />         
                            <table fixed" id="Section1" cellspacing="0" cellpadding="3"
                                width="100%"> 
                                    <tr>
                                        <td colspan="7">
                                            <table><tr>
                                                <td class="req"  style="width:10%" >仪器名称：</td>
                                                <td class="req" style="width:90%"  >
                                                    <asp:Label ID="lbInstrumentName" runat="server" Text=""></asp:Label>
                                                </td>
                                            </tr></table>
                                        </td>
                                    </tr>                                
                                    <tr>
                                        <td style="width:80px">
                                           厂家:
                                        </td>
                                        <td  style="width:80px">
                                               <asp:DropDownList runat="server" ID="BrandList" AutoPostBack="true" 
                                                   onselectedindexchanged="BrandList_SelectedIndexChanged"></asp:DropDownList>
                                        </td>
                                        <td style="width:80px">
                                           类型:
                                        </td>
                                        <td style="width:80px">
                                               <asp:DropDownList runat="server" ID="ddlAccessoryType" AutoPostBack="true" onselectedindexchanged="ddlAccessoryType_SelectedIndexChanged" 
                                                  >
                                                   <asp:ListItem></asp:ListItem>
                                                   <asp:ListItem Value="1" Selected ="True">配件</asp:ListItem>
                                                   <asp:ListItem Value="2">易耗件</asp:ListItem>
                                               </asp:DropDownList>
                                        </td>
                                        <td style="width:120px">
                                            配件、易耗件
                                        </td>
                                        <td  style="width:410px">
                                               <asp:DropDownList runat="server" ID="AccessoryList" Width="400px"></asp:DropDownList>
                                        </td>
                                        <td  style="width:14px">
                                            <asp:Button ID="btnAdd" runat="server" Text="添加" onclick="btnAdd_Click" /></td>
                                    </tr>                                                                                             
                            </table>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
        <rad:RadGrid runat="server" ID="gridSubItems" Skin="OCM" AutoGenerateColumns="False"
            AllowSorting="false" GridLines="None" EnableAJAX="true" EnableAJAXLoadingTemplate="True"
            OnItemCommand="gridSubItems_ItemCommand" 
            onitemdatabound="gridSubItems_ItemDataBound">
            <AJAXLoadingTemplate>
                <img src="../Images/loadding_orange.gif" />
                加载中...
            </AJAXLoadingTemplate>
            <MasterTableView DataKeyNames="AccessoryID">
                <Columns>
                            <rad:GridTemplateColumn HeaderText="类型">
                                 <ItemTemplate>
                                    <asp:Label runat="server" ID="AccessoryID" Text='<%#Eval("AccessoryID") %>' Visible="false"></asp:Label> 
                                    <asp:Label runat="server" ID="AccessoryType" Text='<%#Eval("AccessoryType") %>' Visible="false"></asp:Label>
                                    <asp:Label runat="server" ID="AccessoryTypeName"></asp:Label>
                                 </ItemTemplate>
                             </rad:GridTemplateColumn>
                             <rad:GridTemplateColumn HeaderText="配件编号（公司）">
                                 <ItemTemplate>
                                    <asp:Label runat="server" ID="CompanyInstrumentCode" Text='<%#Eval("CompanyInstrumentCode") %>'></asp:Label>
                                 </ItemTemplate>
                             </rad:GridTemplateColumn>
                             <rad:GridTemplateColumn HeaderText="配件编号（厂家）">
                                 <ItemTemplate>
                                    <asp:Label runat="server" ID="FactoryInstrumentCode" Text='<%#Eval("FactoryInstrumentCode") %>'></asp:Label>
                                 </ItemTemplate>
                             </rad:GridTemplateColumn>
                             <rad:GridTemplateColumn HeaderText="配件名称">
                                 <ItemTemplate>
                                    <asp:Label runat="server" ID="AccessoryName" Text='<%#Eval("AccessoryName") %>'></asp:Label>
                                 </ItemTemplate>
                             </rad:GridTemplateColumn>
                             <rad:GridTemplateColumn HeaderText="规格">
                                 <ItemTemplate>
                                    <asp:Label runat="server" ID="AccessoryStandard" Text='<%#Eval("AccessoryStandard") %>'></asp:Label>
                                 </ItemTemplate>
                             </rad:GridTemplateColumn>
                             <rad:GridTemplateColumn HeaderText="单位">
                                 <ItemTemplate>
                                    <asp:Label runat="server" ID="Unit" Text='<%#Eval("Unit") %>'></asp:Label>
                                 </ItemTemplate>
                             </rad:GridTemplateColumn>
                             <rad:GridTemplateColumn HeaderText="厂家">
                                 <ItemTemplate>
                                    <asp:Label runat="server" ID="Vendor" Text='<%#Eval("Vendor") %>'></asp:Label>
                                 </ItemTemplate>
                             </rad:GridTemplateColumn>
                             
                             
                    <rad:GridButtonColumn CommandName="delete" Text="删除">
                    </rad:GridButtonColumn>
                </Columns>
            </MasterTableView>
        </rad:RadGrid>
    </div>
    </form>
</body>
</html>
